package com.rede.didiok.community.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rede.didiok.common.dto.community.UserMomentDto;
import com.rede.didiok.community.entity.UserMomentEntity;

/**
 * 用户动态表
 * 
 * @author Rede
 * @email didiok@foxmail.com
 * @date 2023-09-06 18:35:23
 */
@Mapper
public interface UserMomentDao extends BaseMapper<UserMomentEntity> {
    /**
     * 根据查询信息
     * 查询动态
     *
     * @param page
     * @param userMomentDto
     * @param toUserUidList
     * @return
     */
    Page<UserMomentDto> list(Page<UserMomentDto> page, @Param("userMomentDto") UserMomentDto userMomentDto, @Param("users") List<String> toUserUidList);

    /**
     * 根据用户id查询动态数
     *
     * @param userUids
     * @return
     */
    List<Map<String, String>> getUserMomentCountByUserIds(@Param("userUids") List<String> userUids);


    /**
     * 榜单成员下架操作
     * @param uid
     * @param rejectReason
     * @param auditStatus
     * @return
     */
    Boolean revocationMoment(@Param("uid") String uid, @Param("rejectReason") String rejectReason,
                              @Param("auditStatus") Integer auditStatus);

    /**
     * 根据传参条件 查询page
     *
     * @param page
     * @param queryObject
     * @return
     */
    Page<UserMomentEntity> queryPage(Page<UserMomentEntity> page, @Param("userMoment") UserMomentDto queryObject);

}
